<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" th:href="@{/css/font.css}">
    <link rel="stylesheet" th:href="@{/css/xadmin.css}">
    <link rel="stylesheet"  th:href="@{/css/file.css}" />
    <link rel="stylesheet"  th:href="@{/css/bootstrap.css}" />
    <link th:href="@{/css/semantic.min.css}" rel="stylesheet">
    <script th:src="@{/lib/layui/layui.js}" charset="utf-8"></script>
    <script type="text/javascript" th:src="@{/js/xadmin.js}"></script>
    <script th:src="@{/js/jquery.js}"></script>
    <script th:src="@{/js/bootstrap.js}"></script>
    <script type="text/javascript" th:src="@{/js/bootstrap-paginator.js}"></script>
    <script th:src="@{/js/semantic.min.js}"></script>

    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>

<!--    弹出框删除-->
<div class="ui basic modal" id="deletemodal">
    <h2 class="header">
        删除课程
    </h2>
    <div class="content">
        删除课程
    </div>
    <form th:action="@{/stu/center/course_test/delete}" method="post">
        <input type="hidden" id="getid" name="id">
        <div class="actions">
            <button class="ui negative button" type="button">否</button>
            <button class="ui positive button" type="submit">是</button>
        </div>
    </form>
</div>
<!--    弹出框删除-->

<!--管理界面-->
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <!--                搜索框-->
                <!--                搜索框-->
                <div class="layui-card-header">
                    <button class="layui-btn" id="buttonadd"><i class="layui-icon"></i>添加</button>
                    <a class="layui-btn" href="" ><i class="layui-icon layui-icon-refresh-3"></i> 刷新</a>
                </div>
                <!--                列表-->
                <div class="layui-card-body ">
                    <table class="layui-table layui-form">
                        <thead>
                        <tr>
                            <th>班级名称</th>
                            <th>操作</th>
                        </thead>
                        <tbody>
                        <tr th:each="class:${classes}">
                            <td th:text="${class.getClass_name()}"></td>
                            <td>
                                <button class="ui primary button" th:onclick="|getinformation(${class.getId()})|" th:text="修改">
                                </button>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <!--                列表-->
            </div>
        </div>
    </div>
</div>
<!--管理界面-->
</body>
<script>
    layui.use(['laydate','form'], function(){
        var laydate = layui.laydate;
        var form = layui.form;


        //执行一个laydate实例
        laydate.render({
            elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
            elem: '#end' //指定元素
        });

    });



    layui.use('form', function() {
        var form = layui.form;

    });

    //添加跳转
    $(document).ready(function () {
        $('#buttonadd').click(function () {
            layer.open({
                type: 2,
                title: '班级添加',
                maxmin: true,
                shadeClose: true, //点击遮罩关闭层
                area : ['800px' , '520px'],
                content:  '/admin/type/class/add'
            });
        })
    });
    //添加跳转

    //进行修改操作
    function getinformation(id) {
        layer.open({
            type: 2,
            title: '修改班级信息',
            maxmin: true,
            shadeClose: true, //点击遮罩关闭层
            area : ['700px' , '420px'],
            content: '/admin/type/class/getinformation?id=' + id
        });
    }

</script>
</html>